package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.CampusQuery;
import com.mk.admin.model.vo.CampusVo;
import com.mk.admin.service.CampusService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/campus")
@Api(tags = "院区")
public class CampusController {
    @Autowired
    private CampusService campusService;

    @PostMapping("/select")
    public ResultDto select(@RequestBody CampusQuery query) {
        return campusService.select(query);
    }

//    @PostMapping("/add")
//    public ResultDto add(@RequestBody CampusVo vo) {
//        return campusService.add(vo);
//    }

    @PostMapping("/update")
    public ResultDto update(@RequestBody CampusVo vo) {
        return campusService.update(vo);
    }

//    @PostMapping("/delete")
//    public ResultDto delete(@RequestBody CampusVo vo) {
//        return campusService.delete(vo.getId());
//    }

//    @PostMapping("/status")
//    public ResultDto status(@RequestBody CampusVo vo) {
//        return campusService.status(vo.getId());
//    }

}
